import { ModalForm } from '@ant-design/pro-components';
import { Image } from 'antd';

export default (props: { eventUrl?: string }) => {
  const { eventUrl } = props;
  return (
    <ModalForm
      title="巡检事件图片"
      width="45vw"
      modalProps={{
        destroyOnClose: true,
        style: {
          textAlign: 'center',
        },
      }}
      submitter={false}
      trigger={<a>查看图片</a>}
    >
      <Image src={eventUrl} />
    </ModalForm>
  );
};
